<ul class="list-group list-group-flush">
    @foreach($replies as $reply)
        <li class="list-group-item d-flex align-items-center"  id="reply{{$reply->id}}">
            <a href="{{route('users.show',$reply->user->id)}}" class="flex-shrink-0">
                <img src="{{$reply->user->avatar}}" alt="avatar"  class="img-thumbnail" width="50"/>
            </a>
            <section class="px-2 flex-grow-1">
                <small class="text-muted">
                <span >
                    <i class="fa-regular fa-user"></i>
                    <a class="text-decoration-none" href="{{route('users.show',$reply->user->id)}}">{{$reply->user->name}}</a>
                </span>

                    <span>&nbsp;•&nbsp;</span>
                    <span>
                    <i class="fa-regular fa-clock"></i>
                <span>{{$reply->created_at->diffForHumans()}}</span>
                </span>
                </small>
                <div class="text-success">{!! $reply->content !!}</div>
            </section>
            <form action="{{route('replies.destroy',$reply->id)}}"
                  method="POST"
                  class="small text-secondary"
                  onsubmit="return confirm('您真的要删除该评论吗?')"
            >
                @csrf
                {{method_field('DELETE')}}
                <button type="submit" class="btn btn-default btn-sm">
                    <i class="fa-solid fa-trash-can text-secondary"></i>
                </button>
            </form>
        </li>
    @endforeach
</ul>


<div>
    {{$replies->links()}}
</div>
